﻿using System;
using System.Runtime.InteropServices;

namespace fm2
{
	internal static class SafeNativeMethods
	{
		[DllImport("shlwapi.dll", CharSet=CharSet.Unicode)]
		public static extern int StrCmpLogicalW(string psz1, string psz2);
		[DllImport("user32.dll", SetLastError=true)]
		public static extern bool SetForegroundWindow(IntPtr hwnd);
		[DllImport("user32.dll")]
		public static extern IntPtr GetForegroundWindow();
		[DllImport("user32.dll")]
		public static extern int ShowWindow(IntPtr hWnd, uint Msg);
		[DllImport("user32.dll", SetLastError = true)]
		public static extern IntPtr FindWindowEx(IntPtr hwndParent, IntPtr hwndChildAfter, string lpszClass, string lpszWindow);
		[DllImport("user32.dll", ExactSpelling=true, CharSet=CharSet.Auto)]
		public static extern IntPtr GetParent(IntPtr hWnd);

		public const int SW_RESTORE = 9;
	}
}
